using System.Web.UI;
namespace ControlLibrary
{
    public static class ExecuteAllDataBind
    {
        public static void ExecuteDataBind(this Page page)
        {
            foreach(Control c in page.Controls)
            {
                c.DataBind();
                c.ExecuteDataBind();
            }
        }

        public static void ExecuteDataBind(this Control control)
        {
            foreach (Control c in control.Controls)
            {
                c.DataBind();
                c.ExecuteDataBind();
            }
        }
    }
}